package com.ruoyi.room.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.room.service.ITbUnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 单元表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-08-29
 */
@RestController
@RequestMapping("/unit/")
/*
* TODO
*   1.单元表添加单元时，需要判断单元名是否重复
* */
public class TbUnitController {

    @Autowired
    ITbUnitService unstableService;

    @GetMapping("getUnitAll")
    public AjaxResult getUnitAll(){
        return AjaxResult.success(unstableService.list());
    }

}
